﻿using CPPEI.Net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CPPEI.ShareScreen.Server
{
    class RequestHandlerFactory : IRequestHandlerFactory
    {
        public IRequestHandler Create(byte command)
        {
            if (command == Contract.Command.GetClientList)
            {
                return new Handler.GetClientListHandler();
            }
            else if (command == Contract.Command.RDConnectToClient)
            {
                return new Handler.RDConnectToClientHandler();
            }
            else if (command == Contract.Command.RD)
            {
                return new Handler.RDHandler();
            }
            else if (command == Contract.Command.RDDisconnect)
            {
                return new Handler.RDDisconnectHandler();
            }
            return null;
        }
    }
}
